/**
 * 
 */
package com.swim.reservationcoach.entity;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 预约私教Entity
 * @author 刘军武
 * @version 2021-05-06
 */
@Table(name="t_reservation_coach", alias="a", columns={
		@Column(name="id", attrName="id", label="唯一标识", isPK=true),
		@Column(name="name", attrName="name", label="姓名", queryType=QueryType.LIKE),
		@Column(name="city", attrName="city", label="城市"),
		@Column(name="area", attrName="area", label="区县"),
		@Column(name="mobile", attrName="mobile", label="手机号"),
		@Column(name="sex", attrName="sex", label="性别"),
		@Column(name="age", attrName="age", label="年龄"),
		@Column(name="class_time", attrName="classTime", label="上课时间段"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class ReservationCoach extends DataEntity<ReservationCoach> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 姓名
	private String city;		// 城市
	private String area;		// 区县
	private String mobile;		// 手机号
	private String sex;		// 性别
	private Integer age;		// 年龄
	private Long classTime;		// 上课时间段
	
	public ReservationCoach() {
		this(null);
	}

	public ReservationCoach(String id){
		super(id);
	}
	
	@NotBlank(message="姓名不能为空")
	@Length(min=0, max=10, message="姓名长度不能超过 10 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="城市不能为空")
	@Length(min=0, max=20, message="城市长度不能超过 20 个字符")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@NotBlank(message="区县不能为空")
	@Length(min=0, max=20, message="区县长度不能超过 20 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@NotBlank(message="手机号不能为空")
	@Length(min=0, max=30, message="手机号长度不能超过 30 个字符")
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@NotBlank(message="性别不能为空")
	@Length(min=0, max=2, message="性别长度不能超过 2 个字符")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@NotNull(message="年龄不能为空")
	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}
	
	@NotNull(message="上课时间段不能为空")
	public Long getClassTime() {
		return classTime;
	}

	public void setClassTime(Long classTime) {
		this.classTime = classTime;
	}
	
}